﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Tanmia.Core;
using Tanmia.Basis.ViewModel;
using Tanmia.Domain;
using System.ComponentModel;
using System.Windows.Data;

namespace Tanmia.Windows.UnitScenario
{
    public class UnitViewModel : BaseViewModel<Unit>
    {
        public ICollectionView Units { get; private set; }

        private UnitDomain UnitDomainObj = new UnitDomain();

        public UnitViewModel()
            : base(new UnitDomain())
        {
            Units = CollectionViewSource.GetDefaultView(UnitDomainObj.GetsWithNullUnit());
        }

        public void UpdateUnits()
        {
            Units = CollectionViewSource.GetDefaultView(UnitDomainObj.GetsWithNullUnit());
        }

    }
}
